<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>InfSession</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.76.0">
<link rel="home" href="index.html" title="libinfinity-0.4 Reference Manual">
<link rel="up" href="ch02.html" title="Common libinfinity API">
<link rel="prev" href="libinfinity-0.4-InfInit.html" title="InfInit">
<link rel="next" href="InfChatSession.html" title="InfChatSession">
<meta name="generator" content="GTK-Doc V1.15 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="libinfinity-0.4-InfInit.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">libinfinity-0.4 Reference Manual</th>
<td><a accesskey="n" href="InfChatSession.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#InfSession.synopsis" class="shortcut">Top</a>
                   | 
                  <a href="#InfSession.description" class="shortcut">Description</a>
                   | 
                  <a href="#InfSession.object-hierarchy" class="shortcut">Object Hierarchy</a>
                   | 
                  <a href="#InfSession.implemented-interfaces" class="shortcut">Implemented Interfaces</a>
                   | 
                  <a href="#InfSession.properties" class="shortcut">Properties</a>
                   | 
                  <a href="#InfSession.signals" class="shortcut">Signals</a>
</td></tr>
</table>
<div class="refentry" title="InfSession">
<a name="InfSession"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="InfSession.top_of_page"></a>InfSession</span></h2>
<p>InfSession — Basic session object and synchronization</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1" title="Stability Level">
<a name="InfSession.stability-level"></a><h2>Stability Level</h2>
Unstable, unless otherwise indicated
</div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="InfSession.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;libinfinity/common/inf-session.h&gt;

enum                <a class="link" href="InfSession.html#InfSessionStatus" title="enum InfSessionStatus">InfSessionStatus</a>;
enum                <a class="link" href="InfSession.html#InfSessionSyncStatus" title="enum InfSessionSyncStatus">InfSessionSyncStatus</a>;
enum                <a class="link" href="InfSession.html#InfSessionSyncError" title="enum InfSessionSyncError">InfSessionSyncError</a>;
                    <a class="link" href="InfSession.html#InfSession-struct" title="InfSession">InfSession</a>;
                    <a class="link" href="InfSession.html#InfSessionClass" title="InfSessionClass">InfSessionClass</a>;
const <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GParameter"><span class="returnvalue">GParameter</span></a> *  <a class="link" href="InfSession.html#inf-session-lookup-user-property" title="inf_session_lookup_user_property ()">inf_session_lookup_user_property</a>    (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GParameter"><span class="type">GParameter</span></a> *params</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_params</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GParameter"><span class="returnvalue">GParameter</span></a> *        <a class="link" href="InfSession.html#inf-session-get-user-property" title="inf_session_get_user_property ()">inf_session_get_user_property</a>       (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"><span class="type">GArray</span></a> *array</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfSession.html#inf-session-user-to-xml" title="inf_session_user_to_xml ()">inf_session_user_to_xml</a>             (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfUser.html" title="InfUser"><span class="type">InfUser</span></a> *user</code></em>,
                                                         <em class="parameter"><code><span class="type">xmlNodePtr</span> xml</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfSession.html#inf-session-close" title="inf_session_close ()">inf_session_close</a>                   (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>);
<a class="link" href="InfCommunicationManager.html" title="InfCommunicationManager"><span class="returnvalue">InfCommunicationManager</span></a> * <a class="link" href="InfSession.html#inf-session-get-communication-manager" title="inf_session_get_communication_manager ()">inf_session_get_communication_manager</a>
                                                        (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>);
<a class="link" href="InfBuffer.html" title="InfBuffer"><span class="returnvalue">InfBuffer</span></a> *         <a class="link" href="InfSession.html#inf-session-get-buffer" title="inf_session_get_buffer ()">inf_session_get_buffer</a>              (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>);
<a class="link" href="InfUserTable.html" title="InfUserTable"><span class="returnvalue">InfUserTable</span></a> *      <a class="link" href="InfSession.html#inf-session-get-user-table" title="inf_session_get_user_table ()">inf_session_get_user_table</a>          (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>);
<a class="link" href="InfSession.html#InfSessionStatus" title="enum InfSessionStatus"><span class="returnvalue">InfSessionStatus</span></a>    <a class="link" href="InfSession.html#inf-session-get-status" title="inf_session_get_status ()">inf_session_get_status</a>              (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>);
<a class="link" href="InfUser.html" title="InfUser"><span class="returnvalue">InfUser</span></a> *           <a class="link" href="InfSession.html#inf-session-add-user" title="inf_session_add_user ()">inf_session_add_user</a>                (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GParameter"><span class="type">GParameter</span></a> *params</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_params</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfSession.html#inf-session-set-user-status" title="inf_session_set_user_status ()">inf_session_set_user_status</a>         (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfUser.html" title="InfUser"><span class="type">InfUser</span></a> *user</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfUser.html#InfUserStatus" title="enum InfUserStatus"><span class="type">InfUserStatus</span></a> status</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfSession.html#inf-session-synchronize-from" title="inf_session_synchronize_from ()">inf_session_synchronize_from</a>        (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfSession.html#inf-session-synchronize-to" title="inf_session_synchronize_to ()">inf_session_synchronize_to</a>          (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfCommunicationGroup.html" title="InfCommunicationGroup"><span class="type">InfCommunicationGroup</span></a> *group</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a> *connection</code></em>);
<a class="link" href="InfSession.html#InfSessionSyncStatus" title="enum InfSessionSyncStatus"><span class="returnvalue">InfSessionSyncStatus</span></a>  <a class="link" href="InfSession.html#inf-session-get-synchronization-status" title="inf_session_get_synchronization_status ()">inf_session_get_synchronization_status</a>
                                                        (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a> *connection</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>             <a class="link" href="InfSession.html#inf-session-get-synchronization-progress" title="inf_session_get_synchronization_progress ()">inf_session_get_synchronization_progress</a>
                                                        (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a> *connection</code></em>);
<a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            <a class="link" href="InfSession.html#inf-session-has-synchronizations" title="inf_session_has_synchronizations ()">inf_session_has_synchronizations</a>    (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>);
<a class="link" href="InfCommunicationGroup.html" title="InfCommunicationGroup"><span class="returnvalue">InfCommunicationGroup</span></a> * <a class="link" href="InfSession.html#inf-session-get-subscription-group" title="inf_session_get_subscription_group ()">inf_session_get_subscription_group</a>
                                                        (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfSession.html#inf-session-set-subscription-group" title="inf_session_set_subscription_group ()">inf_session_set_subscription_group</a>  (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfCommunicationGroup.html" title="InfCommunicationGroup"><span class="type">InfCommunicationGroup</span></a> *group</code></em>);
<span class="returnvalue">void</span>                <a class="link" href="InfSession.html#inf-session-send-to-subscriptions" title="inf_session_send_to_subscriptions ()">inf_session_send_to_subscriptions</a>   (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><span class="type">xmlNodePtr</span> xml</code></em>);
</pre>
</div>
<div class="refsect1" title="Object Hierarchy">
<a name="InfSession.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="synopsis">
  <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
   +----InfSession
         +----<a class="link" href="InfAdoptedSession.html" title="InfAdoptedSession">InfAdoptedSession</a>
         +----<a class="link" href="InfChatSession.html" title="InfChatSession">InfChatSession</a>
</pre>
</div>
<div class="refsect1" title="Implemented Interfaces">
<a name="InfSession.implemented-interfaces"></a><h2>Implemented Interfaces</h2>
<p>
InfSession implements
 <a class="link" href="InfCommunicationObject.html" title="InfCommunicationObject">InfCommunicationObject</a>.</p>
</div>
<div class="refsect1" title="Properties">
<a name="InfSession.properties"></a><h2>Properties</h2>
<pre class="synopsis">
  "<a class="link" href="InfSession.html#InfSession--buffer" title='The "buffer" property'>buffer</a>"                   <a class="link" href="InfBuffer.html" title="InfBuffer"><span class="type">InfBuffer</span></a>*            : Read / Write / Construct Only
  "<a class="link" href="InfSession.html#InfSession--communication-manager" title='The "communication-manager" property'>communication-manager</a>"    <a class="link" href="InfCommunicationManager.html" title="InfCommunicationManager"><span class="type">InfCommunicationManager</span></a>*  : Read / Write / Construct Only
  "<a class="link" href="InfSession.html#InfSession--status" title='The "status" property'>status</a>"                   <a class="link" href="InfSession.html#InfSessionStatus" title="enum InfSessionStatus"><span class="type">InfSessionStatus</span></a>      : Read / Write / Construct Only
  "<a class="link" href="InfSession.html#InfSession--subscription-group" title='The "subscription-group" property'>subscription-group</a>"       <a class="link" href="InfCommunicationGroup.html" title="InfCommunicationGroup"><span class="type">InfCommunicationGroup</span></a>*  : Read / Write
  "<a class="link" href="InfSession.html#InfSession--sync-connection" title='The "sync-connection" property'>sync-connection</a>"          <a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a>*     : Read / Write / Construct Only
  "<a class="link" href="InfSession.html#InfSession--sync-group" title='The "sync-group" property'>sync-group</a>"               <a class="link" href="InfCommunicationGroup.html" title="InfCommunicationGroup"><span class="type">InfCommunicationGroup</span></a>*  : Read / Write / Construct Only
  "<a class="link" href="InfSession.html#InfSession--user-table" title='The "user-table" property'>user-table</a>"               <a class="link" href="InfUserTable.html" title="InfUserTable"><span class="type">InfUserTable</span></a>*         : Read / Write / Construct Only
</pre>
</div>
<div class="refsect1" title="Signals">
<a name="InfSession.signals"></a><h2>Signals</h2>
<pre class="synopsis">
  "<a class="link" href="InfSession.html#InfSession-close" title='The "close" signal'>close</a>"                                          : Run Last
  "<a class="link" href="InfSession.html#InfSession-synchronization-begin" title='The "synchronization-begin" signal'>synchronization-begin</a>"                          : Run Last
  "<a class="link" href="InfSession.html#InfSession-synchronization-complete" title='The "synchronization-complete" signal'>synchronization-complete</a>"                       : Run Last
  "<a class="link" href="InfSession.html#InfSession-synchronization-failed" title='The "synchronization-failed" signal'>synchronization-failed</a>"                         : Run Last
  "<a class="link" href="InfSession.html#InfSession-synchronization-progress" title='The "synchronization-progress" signal'>synchronization-progress</a>"                       : Run Last
</pre>
</div>
<div class="refsect1" title="Description">
<a name="InfSession.description"></a><h2>Description</h2>
<p>
<a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> represents an editing session. The actual type of document that
is edited is not specified, so instantiating <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> does not make
any sense. You rather want to use a derived class such as <a href="../libinftext-0.4/InfTextSession.html"><span class="type">InfTextSession</span></a>.
Normally, the <a class="link" href="InfcBrowser.html" title="InfcBrowser"><span class="type">InfcBrowser</span></a> or <a class="link" href="InfdDirectory.html" title="InfdDirectory"><span class="type">InfdDirectory</span></a>, respectively, already take
care of instantiating the correct <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>.
</p>
<p>
A session basically consists of the document being edited (also called
buffer, see <a class="link" href="InfBuffer.html" title="InfBuffer"><span class="type">InfBuffer</span></a>) and the users that are working on the document,
see <a class="link" href="InfUserTable.html" title="InfUserTable"><span class="type">InfUserTable</span></a>.
</p>
<p>
A session can either start in <a class="link" href="InfSession.html#INF-SESSION-RUNNING:CAPS"><code class="literal">INF_SESSION_RUNNING</code></a> state, in which it
is created with the initial buffer and user table. It may also start in
<a class="link" href="InfSession.html#INF-SESSION-SYNCHRONIZING:CAPS"><code class="literal">INF_SESSION_SYNCHRONIZING</code></a> state. In this case, both buffer and user table
are initially empty and are copied from another system over the network.
When the copy is complete, the session enters <a class="link" href="InfSession.html#INF-SESSION-RUNNING:CAPS"><code class="literal">INF_SESSION_RUNNING</code></a> state.
</p>
<p>
To be notified about changes other users make to a session, you need to
subscribe to the session (on client side), or wait for incoming
subscriptions (on server side). This is normally done by
<code class="function">infc_browser_subscribe_session()</code>. The first action that is performed upon
subscription is a synchronization as described above. When the
synchronization is complete, the <a class="link" href="InfSession.html#InfSession-synchronization-complete" title='The "synchronization-complete" signal'><span class="type">"synchronization-complete"</span></a> signal
is emitted.
</p>
<p>
After subscription, one can observe modifications other users make, but it is
not possible to make own modifications. Before doing so, a <a class="link" href="InfUser.html" title="InfUser"><span class="type">InfUser</span></a> needs to
be joined. This is done by client/server specific API such as
<a class="link" href="InfcSessionProxy.html#infc-session-proxy-join-user" title="infc_session_proxy_join_user ()"><code class="function">infc_session_proxy_join_user()</code></a> or <code class="function">infd_session_proxy_join_user()</code>. The
required parameters still depend on the actual note type, which is why most
note implementations offer their own API to join a user.
</p>
</div>
<div class="refsect1" title="Details">
<a name="InfSession.details"></a><h2>Details</h2>
<div class="refsect2" title="enum InfSessionStatus">
<a name="InfSessionStatus"></a><h3>enum InfSessionStatus</h3>
<pre class="programlisting">typedef enum _InfSessionStatus {
  INF_SESSION_PRESYNC,
  INF_SESSION_SYNCHRONIZING,
  INF_SESSION_RUNNING,
  INF_SESSION_CLOSED
} InfSessionStatus;
</pre>
<p>
<a class="link" href="InfSession.html#InfSessionStatus" title="enum InfSessionStatus"><span class="type">InfSessionStatus</span></a> defines in what state a session is in.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="INF-SESSION-PRESYNC:CAPS"></a><span class="term"><code class="literal">INF_SESSION_PRESYNC</code></span></p></td>
<td>The session is scheduled to be synchronized from a
remote host. This can be useful if the session is needed to be present
before the actual synchronization begins. Use
<a class="link" href="InfSession.html#inf-session-synchronize-from" title="inf_session_synchronize_from ()"><code class="function">inf_session_synchronize_from()</code></a> to switch to
<a class="link" href="InfSession.html#INF-SESSION-SYNCHRONIZING:CAPS"><code class="literal">INF_SESSION_SYNCHRONIZING</code></a>.
</td>
</tr>
<tr>
<td><p><a name="INF-SESSION-SYNCHRONIZING:CAPS"></a><span class="term"><code class="literal">INF_SESSION_SYNCHRONIZING</code></span></p></td>
<td>The session is currently being synchronized
from a remote host. When done synchronizing, it will enter into
<a class="link" href="InfSession.html#INF-SESSION-RUNNING:CAPS"><code class="literal">INF_SESSION_RUNNING</code></a> state.
</td>
</tr>
<tr>
<td><p><a name="INF-SESSION-RUNNING:CAPS"></a><span class="term"><code class="literal">INF_SESSION_RUNNING</code></span></p></td>
<td>The session is running and ready to synchronize
other hosts. If a subscription group is set
(see <a class="link" href="InfSession.html#inf-session-set-subscription-group" title="inf_session_set_subscription_group ()"><code class="function">inf_session_set_subscription_group()</code></a>), then changes to the
underlying buffer are transmitted to all subscribed connections.
</td>
</tr>
<tr>
<td><p><a name="INF-SESSION-CLOSED:CAPS"></a><span class="term"><code class="literal">INF_SESSION_CLOSED</code></span></p></td>
<td>The session is closed and can no longer be used. The
session enters this state if the synchronization fails in
<a class="link" href="InfSession.html#INF-SESSION-SYNCHRONIZING:CAPS"><code class="literal">INF_SESSION_SYNCHRONIZING</code></a> state or <a class="link" href="InfSession.html#inf-session-close" title="inf_session_close ()"><code class="function">inf_session_close()</code></a> is called.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="enum InfSessionSyncStatus">
<a name="InfSessionSyncStatus"></a><h3>enum InfSessionSyncStatus</h3>
<pre class="programlisting">typedef enum _InfSessionSyncStatus {
  INF_SESSION_SYNC_NONE,
  INF_SESSION_SYNC_IN_PROGRESS,
  INF_SESSION_SYNC_AWAITING_ACK
} InfSessionSyncStatus;
</pre>
<p>
<a class="link" href="InfSession.html#InfSessionSyncStatus" title="enum InfSessionSyncStatus"><span class="type">InfSessionSyncStatus</span></a> represents the status of a synchronization. It is
used by <a class="link" href="InfSession.html#inf-session-get-synchronization-status" title="inf_session_get_synchronization_status ()"><code class="function">inf_session_get_synchronization_status()</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="INF-SESSION-SYNC-NONE:CAPS"></a><span class="term"><code class="literal">INF_SESSION_SYNC_NONE</code></span></p></td>
<td>No synchronization is ongoing.
</td>
</tr>
<tr>
<td><p><a name="INF-SESSION-SYNC-IN-PROGRESS:CAPS"></a><span class="term"><code class="literal">INF_SESSION_SYNC_IN_PROGRESS</code></span></p></td>
<td>Synchronization is currently in progress.
</td>
</tr>
<tr>
<td><p><a name="INF-SESSION-SYNC-AWAITING-ACK:CAPS"></a><span class="term"><code class="literal">INF_SESSION_SYNC_AWAITING_ACK</code></span></p></td>
<td>All synchronization data has been sent
(progress is 1.0), but we are still waiting for an acknowledgment from the
remote site. Synchronization can no longer be cancelled, but it can stiff
fail.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="enum InfSessionSyncError">
<a name="InfSessionSyncError"></a><h3>enum InfSessionSyncError</h3>
<pre class="programlisting">typedef enum _InfSessionSyncError {
  INF_SESSION_SYNC_ERROR_GOT_MESSAGE_IN_PRESYNC,
  INF_SESSION_SYNC_ERROR_UNEXPECTED_NODE,
  INF_SESSION_SYNC_ERROR_ID_NOT_PRESENT,
  INF_SESSION_SYNC_ERROR_ID_IN_USE,
  INF_SESSION_SYNC_ERROR_NAME_NOT_PRESENT,
  INF_SESSION_SYNC_ERROR_NAME_IN_USE,
  INF_SESSION_SYNC_ERROR_CONNECTION_CLOSED,
  INF_SESSION_SYNC_ERROR_SENDER_CANCELLED,
  INF_SESSION_SYNC_ERROR_RECEIVER_CANCELLED,
  INF_SESSION_SYNC_ERROR_UNEXPECTED_BEGIN_OF_SYNC,
  INF_SESSION_SYNC_ERROR_NUM_MESSAGES_MISSING,
  INF_SESSION_SYNC_ERROR_UNEXPECTED_END_OF_SYNC,
  INF_SESSION_SYNC_ERROR_EXPECTED_BEGIN_OF_SYNC,
  INF_SESSION_SYNC_ERROR_EXPECTED_END_OF_SYNC,

  INF_SESSION_SYNC_ERROR_FAILED
} InfSessionSyncError;
</pre>
<p>
These are errors that can occur during a synchronization of a session.
Additional errors may occur depending on the session type.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="INF-SESSION-SYNC-ERROR-GOT-MESSAGE-IN-PRESYNC:CAPS"></a><span class="term"><code class="literal">INF_SESSION_SYNC_ERROR_GOT_MESSAGE_IN_PRESYNC</code></span></p></td>
<td>Received a message
in state <a class="link" href="InfSession.html#INF-SESSION-PRESYNC:CAPS"><code class="literal">INF_SESSION_PRESYNC</code></a>. It is not processed because
<a class="link" href="InfSession.html#inf-session-synchronize-from" title="inf_session_synchronize_from ()"><code class="function">inf_session_synchronize_from()</code></a> was not yet called.
</td>
</tr>
<tr>
<td><p><a name="INF-SESSION-SYNC-ERROR-UNEXPECTED-NODE:CAPS"></a><span class="term"><code class="literal">INF_SESSION_SYNC_ERROR_UNEXPECTED_NODE</code></span></p></td>
<td>A message has been received that
was not understood.
</td>
</tr>
<tr>
<td><p><a name="INF-SESSION-SYNC-ERROR-ID-NOT-PRESENT:CAPS"></a><span class="term"><code class="literal">INF_SESSION_SYNC_ERROR_ID_NOT_PRESENT</code></span></p></td>
<td>An ID was not provided for a user
in the session.
</td>
</tr>
<tr>
<td><p><a name="INF-SESSION-SYNC-ERROR-ID-IN-USE:CAPS"></a><span class="term"><code class="literal">INF_SESSION_SYNC_ERROR_ID_IN_USE</code></span></p></td>
<td>The ID of a user is already in use by
another user.
</td>
</tr>
<tr>
<td><p><a name="INF-SESSION-SYNC-ERROR-NAME-NOT-PRESENT:CAPS"></a><span class="term"><code class="literal">INF_SESSION_SYNC_ERROR_NAME_NOT_PRESENT</code></span></p></td>
<td>A name was not provided for a
user in the session.
</td>
</tr>
<tr>
<td><p><a name="INF-SESSION-SYNC-ERROR-NAME-IN-USE:CAPS"></a><span class="term"><code class="literal">INF_SESSION_SYNC_ERROR_NAME_IN_USE</code></span></p></td>
<td>The name of a user is already in use
by another user.
</td>
</tr>
<tr>
<td><p><a name="INF-SESSION-SYNC-ERROR-CONNECTION-CLOSED:CAPS"></a><span class="term"><code class="literal">INF_SESSION_SYNC_ERROR_CONNECTION_CLOSED</code></span></p></td>
<td>The synchronization connection
has been closed.
</td>
</tr>
<tr>
<td><p><a name="INF-SESSION-SYNC-ERROR-SENDER-CANCELLED:CAPS"></a><span class="term"><code class="literal">INF_SESSION_SYNC_ERROR_SENDER_CANCELLED</code></span></p></td>
<td>The sender has cancelled the
synchronization.
</td>
</tr>
<tr>
<td><p><a name="INF-SESSION-SYNC-ERROR-RECEIVER-CANCELLED:CAPS"></a><span class="term"><code class="literal">INF_SESSION_SYNC_ERROR_RECEIVER_CANCELLED</code></span></p></td>
<td>The receiver has cancelled the
synchronization.
</td>
</tr>
<tr>
<td><p><a name="INF-SESSION-SYNC-ERROR-UNEXPECTED-BEGIN-OF-SYNC:CAPS"></a><span class="term"><code class="literal">INF_SESSION_SYNC_ERROR_UNEXPECTED_BEGIN_OF_SYNC</code></span></p></td>
<td>Received
&lt;sync-begin/&gt;
not a the beginning of the synchronization.
</td>
</tr>
<tr>
<td><p><a name="INF-SESSION-SYNC-ERROR-NUM-MESSAGES-MISSING:CAPS"></a><span class="term"><code class="literal">INF_SESSION_SYNC_ERROR_NUM_MESSAGES_MISSING</code></span></p></td>
<td>The &lt;sync-begin/&gt;
message does not contain the number of synchronization messages to expect.
</td>
</tr>
<tr>
<td><p><a name="INF-SESSION-SYNC-ERROR-UNEXPECTED-END-OF-SYNC:CAPS"></a><span class="term"><code class="literal">INF_SESSION_SYNC_ERROR_UNEXPECTED_END_OF_SYNC</code></span></p></td>
<td>The &lt;sync-end/&gt;
message was not received at the end of the synchronization.
</td>
</tr>
<tr>
<td><p><a name="INF-SESSION-SYNC-ERROR-EXPECTED-BEGIN-OF-SYNC:CAPS"></a><span class="term"><code class="literal">INF_SESSION_SYNC_ERROR_EXPECTED_BEGIN_OF_SYNC</code></span></p></td>
<td>The &lt;sync-begin/&gt;
message was not received at the beginning of the synchronization.
</td>
</tr>
<tr>
<td><p><a name="INF-SESSION-SYNC-ERROR-EXPECTED-END-OF-SYNC:CAPS"></a><span class="term"><code class="literal">INF_SESSION_SYNC_ERROR_EXPECTED_END_OF_SYNC</code></span></p></td>
<td>The &lt;sync-end/&gt; message
was not received at the end of the synchronization.
</td>
</tr>
<tr>
<td><p><a name="INF-SESSION-SYNC-ERROR-FAILED:CAPS"></a><span class="term"><code class="literal">INF_SESSION_SYNC_ERROR_FAILED</code></span></p></td>
<td>Generic error code when no further reason
of failure is known.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="InfSession">
<a name="InfSession-struct"></a><h3>InfSession</h3>
<pre class="programlisting">typedef struct _InfSession InfSession;</pre>
<p>
<a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> is an opaque data type. You should only access it via the
public API functions.
</p>
</div>
<hr>
<div class="refsect2" title="InfSessionClass">
<a name="InfSessionClass"></a><h3>InfSessionClass</h3>
<pre class="programlisting">typedef struct {
  /* Virtual table */
  void(*to_xml_sync)(InfSession* session,
                     xmlNodePtr parent);

  gboolean(*process_xml_sync)(InfSession* session,
                              InfXmlConnection* connection,
                              xmlNodePtr xml,
                              GError** error);

  InfCommunicationScope(*process_xml_run)(InfSession* session,
                                          InfXmlConnection* connection,
                                          xmlNodePtr xml,
                                          GError** error);

  GArray*(*get_xml_user_props)(InfSession* session,
                               InfXmlConnection* conn,
                               xmlNodePtr xml);

  void (*set_xml_user_props)(InfSession* session,
                             const GParameter* params,
                             guint n_params,
                             xmlNodePtr xml);

  gboolean(*validate_user_props)(InfSession* session,
                                 const GParameter* params,
                                 guint n_params,
                                 InfUser* exclude,
                                 GError** error);

  InfUser*(*user_new)(InfSession* session,
                      GParameter* params,
                      guint n_params);

  /* Signals */
  void(*close)(InfSession* session);

  void(*synchronization_begin)(InfSession* session,
                               InfCommunicationGroup* group,
                               InfXmlConnection* connection);

  void(*synchronization_progress)(InfSession* session,
                                  InfXmlConnection* connection,
                                  gdouble percentage);

  void(*synchronization_complete)(InfSession* session,
                                  InfXmlConnection* connection);

  void(*synchronization_failed)(InfSession* session,
                                InfXmlConnection* connection,
                                const GError* error);
} InfSessionClass;
</pre>
<p>
This structure contains the virtual functions and default signal handlers
of <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfSessionClass.to-xml-sync"></a>to_xml_sync</code></em> ()</span></p></td>
<td>Virtual function that saves the session within a XML
document. <em class="parameter"><code>parent</code></em> is the root node of the document. It should create as
much nodes as possible within that root node and not in sub-nodes because
these are sent to a client and it is not allowed that other traffic is put
in between those nodes. This way, communication through the same connection
does not hang just because a large session is synchronized.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfSessionClass.process-xml-sync"></a>process_xml_sync</code></em> ()</span></p></td>
<td>Virtual function that is called for every node in the
XML document created by <em class="parameter"><code>to_xml_sync</code></em>. It is supposed to reconstruct the
session content from the XML data.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfSessionClass.process-xml-run"></a>process_xml_run</code></em> ()</span></p></td>
<td>Virtual function that is called for every received
message while the session is running. Return <a class="link" href="InfCommunicationObject.html#INF-COMMUNICATION-SCOPE-GROUP:CAPS"><code class="literal">INF_COMMUNICATION_SCOPE_GROUP</code></a>
if the message is designated for all group members (see also
<code class="function">inf_net_object_received()</code> on this topic).
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfSessionClass.get-xml-user-props"></a>get_xml_user_props</code></em> ()</span></p></td>
<td>Virtual function that creates a list of
<a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GParameter"><span class="type">GParameter</span></a>s for use with <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-newv"><code class="function">g_object_newv()</code></a> from a XML node.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfSessionClass.set-xml-user-props"></a>set_xml_user_props</code></em> ()</span></p></td>
<td>Virtual function that writes the passed user
properties into a XML node.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfSessionClass.validate-user-props"></a>validate_user_props</code></em> ()</span></p></td>
<td>Virtual function that checks whether the given user
properties are valid for a user join. This prevents a user join if there is
already a user with the same name. If <em class="parameter"><code>exclude</code></em> is not <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the 
function does ignore it when validating.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfSessionClass.user-new"></a>user_new</code></em> ()</span></p></td>
<td>Virtual function that creates a new user object with the given
properties.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfSessionClass.close"></a>close</code></em> ()</span></p></td>
<td>Default signal handler for the <a class="link" href="InfSession.html#InfSession-close" title='The "close" signal'><span class="type">"close"</span></a> signal. This
cancels currently running synchronization in <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfSessionClass.synchronization-begin"></a>synchronization_begin</code></em> ()</span></p></td>
<td>Default signal handler for the
<a class="link" href="InfSession.html#InfSession-synchronization-begin" title='The "synchronization-begin" signal'><span class="type">"synchronization-begin"</span></a> signal. The default handler queues the
synchronization messages.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfSessionClass.synchronization-progress"></a>synchronization_progress</code></em> ()</span></p></td>
<td>Default signal handler for the
<a class="link" href="InfSession.html#InfSession-synchronization-progress" title='The "synchronization-progress" signal'><span class="type">"synchronization-progress"</span></a> signal.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfSessionClass.synchronization-complete"></a>synchronization_complete</code></em> ()</span></p></td>
<td>Default signal handler for the
<a class="link" href="InfSession.html#InfSession-synchronization-complete" title='The "synchronization-complete" signal'><span class="type">"synchronization-complete"</span></a> signal. If the session itself got
synchronized (and did not synchronize another session), then the default
handler changes status to <a class="link" href="InfSession.html#INF-SESSION-RUNNING:CAPS"><code class="literal">INF_SESSION_RUNNING</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="structfield"><code><a name="InfSessionClass.synchronization-failed"></a>synchronization_failed</code></em> ()</span></p></td>
<td>Default signal handler for the
<a class="link" href="InfSession.html#InfSession-synchronization-failed" title='The "synchronization-failed" signal'><span class="type">"synchronization-failed"</span></a> signal. If the session itself got
synchronized (and did not synchronize another session), then the default
handler changes status to <a class="link" href="InfSession.html#INF-SESSION-CLOSED:CAPS"><code class="literal">INF_SESSION_CLOSED</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_session_lookup_user_property ()">
<a name="inf-session-lookup-user-property"></a><h3>inf_session_lookup_user_property ()</h3>
<pre class="programlisting">const <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GParameter"><span class="returnvalue">GParameter</span></a> *  inf_session_lookup_user_property    (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GParameter"><span class="type">GParameter</span></a> *params</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_params</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>
Looks up the parameter with the given name in <em class="parameter"><code>array</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>params</code></em> :</span></p></td>
<td>A pointer to an array of containing <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GParameter"><span class="type">GParameter</span></a> values.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_params</code></em> :</span></p></td>
<td>The number of elements in the aforementioned array
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>Name to look up.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GParameter"><span class="type">GParameter</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_session_get_user_property ()">
<a name="inf-session-get-user-property"></a><h3>inf_session_get_user_property ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GParameter"><span class="returnvalue">GParameter</span></a> *        inf_session_get_user_property       (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"><span class="type">GArray</span></a> *array</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *name</code></em>);</pre>
<p>
Looks up the paremeter with the given name in <em class="parameter"><code>array</code></em>. If there is no such
parameter, a new one will be created.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>array</code></em> :</span></p></td>
<td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Arrays.html#GArray"><span class="type">GArray</span></a> containing <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GParameter"><span class="type">GParameter</span></a> values.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>name</code></em> :</span></p></td>
<td>Name to look up.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GParameter"><span class="type">GParameter</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_session_user_to_xml ()">
<a name="inf-session-user-to-xml"></a><h3>inf_session_user_to_xml ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_session_user_to_xml             (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfUser.html" title="InfUser"><span class="type">InfUser</span></a> *user</code></em>,
                                                         <em class="parameter"><code><span class="type">xmlNodePtr</span> xml</code></em>);</pre>
<p>
This is a convenience function that queries <em class="parameter"><code>user</code></em>'s properties and
calls set_xml_user_props with them. This adds the properties of <em class="parameter"><code>user</code></em>
to <em class="parameter"><code>xml</code></em>.
</p>
<p>
An equivalent user object may be built by calling the get_xml_user_props
vfunc on <em class="parameter"><code>xml</code></em> and then calling the user_new vfunc with the resulting
properties.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user</code></em> :</span></p></td>
<td>A <a class="link" href="InfUser.html" title="InfUser"><span class="type">InfUser</span></a> contained in <em class="parameter"><code>session</code></em>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>xml</code></em> :</span></p></td>
<td>An XML node to which to add user information.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_session_close ()">
<a name="inf-session-close"></a><h3>inf_session_close ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_session_close                   (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>);</pre>
<p>
Closes a running session. When a session is closed, it unrefs all
connections and no longer handles requests.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_session_get_communication_manager ()">
<a name="inf-session-get-communication-manager"></a><h3>inf_session_get_communication_manager ()</h3>
<pre class="programlisting"><a class="link" href="InfCommunicationManager.html" title="InfCommunicationManager"><span class="returnvalue">InfCommunicationManager</span></a> * inf_session_get_communication_manager
                                                        (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>);</pre>
<p>
Returns the communication manager for <em class="parameter"><code>session</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A <a class="link" href="InfCommunicationManager.html" title="InfCommunicationManager"><span class="type">InfCommunicationManager</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_session_get_buffer ()">
<a name="inf-session-get-buffer"></a><h3>inf_session_get_buffer ()</h3>
<pre class="programlisting"><a class="link" href="InfBuffer.html" title="InfBuffer"><span class="returnvalue">InfBuffer</span></a> *         inf_session_get_buffer              (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>);</pre>
<p>
Returns the buffer used by <em class="parameter"><code>session</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A <a class="link" href="InfBuffer.html" title="InfBuffer"><span class="type">InfBuffer</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_session_get_user_table ()">
<a name="inf-session-get-user-table"></a><h3>inf_session_get_user_table ()</h3>
<pre class="programlisting"><a class="link" href="InfUserTable.html" title="InfUserTable"><span class="returnvalue">InfUserTable</span></a> *      inf_session_get_user_table          (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>);</pre>
<p>
Returns the user table used by <em class="parameter"><code>session</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A <a class="link" href="InfUserTable.html" title="InfUserTable"><span class="type">InfUserTable</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_session_get_status ()">
<a name="inf-session-get-status"></a><h3>inf_session_get_status ()</h3>
<pre class="programlisting"><a class="link" href="InfSession.html#InfSessionStatus" title="enum InfSessionStatus"><span class="returnvalue">InfSessionStatus</span></a>    inf_session_get_status              (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>);</pre>
<p>
Returns the session's status.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The status of <em class="parameter"><code>session</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_session_add_user ()">
<a name="inf-session-add-user"></a><h3>inf_session_add_user ()</h3>
<pre class="programlisting"><a class="link" href="InfUser.html" title="InfUser"><span class="returnvalue">InfUser</span></a> *           inf_session_add_user                (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code>const <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GParameter"><span class="type">GParameter</span></a> *params</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> n_params</code></em>,
                                                         <em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Adds a user to <em class="parameter"><code>session</code></em>. The user object is constructed via the
user_new vfunc of <a class="link" href="InfSession.html#InfSessionClass" title="InfSessionClass"><span class="type">InfSessionClass</span></a>. This will create a new <a class="link" href="InfUser.html" title="InfUser"><span class="type">InfUser</span></a>
object by default, but may be overridden by subclasses to create
different kinds of users.
</p>
<p>
Note that this function does not tell the other participants that the
user was added. To avoid conflicts, normally only the publisher of the
session can add users and notifies others accordingly. This is handled
by <a class="link" href="InfdSessionProxy.html" title="InfdSessionProxy"><span class="type">InfdSessionProxy</span></a> or <a class="link" href="InfcSessionProxy.html" title="InfcSessionProxy"><span class="type">InfcSessionProxy</span></a>, respectively.
</p>
<p>
You should not call this function unless you know what you are doing.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>params</code></em> :</span></p></td>
<td>Construction parameters for the <a class="link" href="InfUser.html" title="InfUser"><span class="type">InfUser</span></a> (or derived) object.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>n_params</code></em> :</span></p></td>
<td>Number of parameters.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>Location to store error information.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The new <a class="link" href="InfUser.html" title="InfUser"><span class="type">InfUser</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> in case of an error.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_session_set_user_status ()">
<a name="inf-session-set-user-status"></a><h3>inf_session_set_user_status ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_session_set_user_status         (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfUser.html" title="InfUser"><span class="type">InfUser</span></a> *user</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfUser.html#InfUserStatus" title="enum InfUserStatus"><span class="type">InfUserStatus</span></a> status</code></em>);</pre>
<p>
Changes the status of the given <em class="parameter"><code>user</code></em> which needs to have the
<code class="literal">INF_USER_LOCAL</code> flag set for this function to be called. If the status
is changed to <code class="literal">INF_USER_UNAVAILABLE</code>, then the user leaves the session. To
rejoin use infc_session_proxy_join_user or infd_session_proxy_join_user,
respectively for a proxy proxying <em class="parameter"><code>session</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user</code></em> :</span></p></td>
<td>A local <a class="link" href="InfUser.html" title="InfUser"><span class="type">InfUser</span></a> from <em class="parameter"><code>session</code></em>'s user table.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>status</code></em> :</span></p></td>
<td>New status for <em class="parameter"><code>user</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_session_synchronize_from ()">
<a name="inf-session-synchronize-from"></a><h3>inf_session_synchronize_from ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_session_synchronize_from        (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>);</pre>
<p>
Switches <em class="parameter"><code>session</code></em>'s status to <a class="link" href="InfSession.html#INF-SESSION-SYNCHRONIZING:CAPS"><code class="literal">INF_SESSION_SYNCHRONIZING</code></a>. In
<a class="link" href="InfSession.html#INF-SESSION-PRESYNC:CAPS"><code class="literal">INF_SESSION_PRESYNC</code></a>, all messages from incoming the synchronizing
connection are ignored, and no cancellation request is sent to the remote
site if the status changes to <a class="link" href="InfSession.html#INF-SESSION-CLOSED:CAPS"><code class="literal">INF_SESSION_CLOSED</code></a>. The rationale behind
that status is that one can prepare a session for synchronization but start
the actual synchronization later, after having made sure that the remote
site is ready to perform the synchronization.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> in status <a class="link" href="InfSession.html#INF-SESSION-PRESYNC:CAPS"><code class="literal">INF_SESSION_PRESYNC</code></a>.
</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_session_synchronize_to ()">
<a name="inf-session-synchronize-to"></a><h3>inf_session_synchronize_to ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_session_synchronize_to          (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfCommunicationGroup.html" title="InfCommunicationGroup"><span class="type">InfCommunicationGroup</span></a> *group</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a> *connection</code></em>);</pre>
<p>
Initiates a synchronization to <em class="parameter"><code>connection</code></em>. On the other end of
<em class="parameter"><code>connection</code></em>, a new session with the sync-connection and sync-group
construction properties set should have been created. <em class="parameter"><code>group</code></em> is used
as a group in the connection manager. It is allowed for <em class="parameter"><code>group</code></em> to have
another <a class="link" href="InfCommunicationObject.html" title="InfCommunicationObject"><span class="type">InfCommunicationObject</span></a> than <em class="parameter"><code>session</code></em>, however, you should forward
the <a class="link" href="InfCommunicationObject.html" title="InfCommunicationObject"><span class="type">InfCommunicationObject</span></a> messages your object receives to <em class="parameter"><code>session</code></em> then.
Also, <em class="parameter"><code>connection</code></em> must already be present in <em class="parameter"><code>group</code></em>, and should not be
removed until synchronization finished.
</p>
<p>
A synchronization can only be initiated if <em class="parameter"><code>session</code></em> is in state
<a class="link" href="InfSession.html#INF-SESSION-RUNNING:CAPS"><code class="literal">INF_SESSION_RUNNING</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> in status <a class="link" href="InfSession.html#INF-SESSION-RUNNING:CAPS"><code class="literal">INF_SESSION_RUNNING</code></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group</code></em> :</span></p></td>
<td>A <a class="link" href="InfCommunicationGroup.html" title="InfCommunicationGroup"><span class="type">InfCommunicationGroup</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <span class="type">InfConnection</span>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_session_get_synchronization_status ()">
<a name="inf-session-get-synchronization-status"></a><h3>inf_session_get_synchronization_status ()</h3>
<pre class="programlisting"><a class="link" href="InfSession.html#InfSessionSyncStatus" title="enum InfSessionSyncStatus"><span class="returnvalue">InfSessionSyncStatus</span></a>  inf_session_get_synchronization_status
                                                        (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a> *connection</code></em>);</pre>
<p>
If <em class="parameter"><code>session</code></em> is in status <a class="link" href="InfSession.html#INF-SESSION-SYNCHRONIZING:CAPS"><code class="literal">INF_SESSION_SYNCHRONIZING</code></a>, this always returns
<a class="link" href="InfSession.html#INF-SESSION-SYNC-IN-PROGRESS:CAPS"><code class="literal">INF_SESSION_SYNC_IN_PROGRESS</code></a> if <em class="parameter"><code>connection</code></em> is the connection with which
the session is synchronized, and <a class="link" href="InfSession.html#INF-SESSION-SYNC-NONE:CAPS"><code class="literal">INF_SESSION_SYNC_NONE</code></a> otherwise.
</p>
<p>
If <em class="parameter"><code>session</code></em> is in status <a class="link" href="InfSession.html#INF-SESSION-RUNNING:CAPS"><code class="literal">INF_SESSION_RUNNING</code></a>, this returns the status
of the synchronization to <em class="parameter"><code>connection</code></em>. <a class="link" href="InfSession.html#INF-SESSION-SYNC-NONE:CAPS"><code class="literal">INF_SESSION_SYNC_NONE</code></a> is returned,
when there is currently no synchronization ongoing to <em class="parameter"><code>connection</code></em>,
<a class="link" href="InfSession.html#INF-SESSION-SYNC-IN-PROGRESS:CAPS"><code class="literal">INF_SESSION_SYNC_IN_PROGRESS</code></a> is returned, if there is one, and
<a class="link" href="InfSession.html#INF-SESSION-SYNC-AWAITING-ACK:CAPS"><code class="literal">INF_SESSION_SYNC_AWAITING_ACK</code></a> if the synchronization is finished but we
are waiting for the acknowledgement from the remote site that all
synchronization data has been progressed successfully. The synchronization
can still fail in this state but it can no longer by cancelled.
</p>
<p>
If <em class="parameter"><code>session</code></em> is in status $INF_SESSION_CLOSED, this always returns
<a class="link" href="InfSession.html#INF-SESSION-SYNC-NONE:CAPS"><code class="literal">INF_SESSION_SYNC_NONE</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The synchronization status of <em class="parameter"><code>connection</code></em>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_session_get_synchronization_progress ()">
<a name="inf-session-get-synchronization-progress"></a><h3>inf_session_get_synchronization_progress ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="returnvalue">gdouble</span></a>             inf_session_get_synchronization_progress
                                                        (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a> *connection</code></em>);</pre>
<p>
This function requires that the synchronization status of <em class="parameter"><code>connection</code></em>
is <a class="link" href="InfSession.html#INF-SESSION-SYNC-IN-PROGRESS:CAPS"><code class="literal">INF_SESSION_SYNC_IN_PROGRESS</code></a> or <a class="link" href="InfSession.html#INF-SESSION-SYNC-AWAITING-ACK:CAPS"><code class="literal">INF_SESSION_SYNC_AWAITING_ACK</code></a>
(see <a class="link" href="InfSession.html#inf-session-get-synchronization-status" title="inf_session_get_synchronization_status ()"><code class="function">inf_session_get_synchronization_status()</code></a>). Then, it returns a value
between 0.0 and 1.0 specifying how much synchronization data has already
been transferred to the remote site.
</p>
<p>
Note that if the session is in status <a class="link" href="InfSession.html#INF-SESSION-RUNNING:CAPS"><code class="literal">INF_SESSION_RUNNING</code></a>, it is
possible that this function returns 1.0 (i.e. all data has been
transmitted) but the synchronization is not yet complete, because the
remote site must still acknowledge the synchronization. The synchronization
then is in status <a class="link" href="InfSession.html#INF-SESSION-SYNC-AWAITING-ACK:CAPS"><code class="literal">INF_SESSION_SYNC_AWAITING_ACK</code></a>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>A <a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A value between 0.0 and 1.0.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_session_has_synchronizations ()">
<a name="inf-session-has-synchronizations"></a><h3>inf_session_has_synchronizations ()</h3>
<pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>            inf_session_has_synchronizations    (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>);</pre>
<p>
Returns whether there are currently ongoing synchronizations. If the
session is in status <a class="link" href="InfSession.html#INF-SESSION-SYNCHRONIZING:CAPS"><code class="literal">INF_SESSION_SYNCHRONIZING</code></a>, then this returns always
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, if it is in <a class="link" href="InfSession.html#INF-SESSION-CLOSED:CAPS"><code class="literal">INF_SESSION_CLOSED</code></a>, then it returns always <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.
If the session is in status <a class="link" href="InfSession.html#INF-SESSION-RUNNING:CAPS"><code class="literal">INF_SESSION_RUNNING</code></a>, then it returns <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>
when the session is currently at least synchronized to one connection and
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> Whether there are ongoing synchronizations.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_session_get_subscription_group ()">
<a name="inf-session-get-subscription-group"></a><h3>inf_session_get_subscription_group ()</h3>
<pre class="programlisting"><a class="link" href="InfCommunicationGroup.html" title="InfCommunicationGroup"><span class="returnvalue">InfCommunicationGroup</span></a> * inf_session_get_subscription_group
                                                        (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>);</pre>
<p>
Returns the subscription group for <em class="parameter"><code>session</code></em>, if any.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> A <a class="link" href="InfCommunicationGroup.html" title="InfCommunicationGroup"><span class="type">InfCommunicationGroup</span></a>, or <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_session_set_subscription_group ()">
<a name="inf-session-set-subscription-group"></a><h3>inf_session_set_subscription_group ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_session_set_subscription_group  (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><a class="link" href="InfCommunicationGroup.html" title="InfCommunicationGroup"><span class="type">InfCommunicationGroup</span></a> *group</code></em>);</pre>
<p>
Sets the subscription group for <em class="parameter"><code>session</code></em>. The subscription group is the
group in which all connections subscribed to the session are a member of.
</p>
<p>
<a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> itself does not deal with subscriptions, so it is your job
to keep <em class="parameter"><code>group</code></em> up-to-date (for example if you add non-local users to
<em class="parameter"><code>session</code></em>). This is normally done by a so-called session proxy such as
<a class="link" href="InfcSessionProxy.html" title="InfcSessionProxy"><span class="type">InfcSessionProxy</span></a> or <a class="link" href="InfdSessionProxy.html" title="InfdSessionProxy"><span class="type">InfdSessionProxy</span></a>, respectively.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group</code></em> :</span></p></td>
<td>A <a class="link" href="InfCommunicationGroup.html" title="InfCommunicationGroup"><span class="type">InfCommunicationGroup</span></a>.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="inf_session_send_to_subscriptions ()">
<a name="inf-session-send-to-subscriptions"></a><h3>inf_session_send_to_subscriptions ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                inf_session_send_to_subscriptions   (<em class="parameter"><code><a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session</code></em>,
                                                         <em class="parameter"><code><span class="type">xmlNodePtr</span> xml</code></em>);</pre>
<p>
Sends a XML message to the all members of <em class="parameter"><code>session</code></em>'s subscription group.
This function can only be called if the subscription group is non-<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. It
takes ownership of <em class="parameter"><code>xml</code></em>.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>A <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>xml</code></em> :</span></p></td>
<td>The message to send.
</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1" title="Property Details">
<a name="InfSession.property-details"></a><h2>Property Details</h2>
<div class="refsect2" title='The "buffer" property'>
<a name="InfSession--buffer"></a><h3>The <code class="literal">"buffer"</code> property</h3>
<pre class="programlisting">  "buffer"                   <a class="link" href="InfBuffer.html" title="InfBuffer"><span class="type">InfBuffer</span></a>*            : Read / Write / Construct Only</pre>
<p>The buffer in which the document content is stored.</p>
</div>
<hr>
<div class="refsect2" title='The "communication-manager" property'>
<a name="InfSession--communication-manager"></a><h3>The <code class="literal">"communication-manager"</code> property</h3>
<pre class="programlisting">  "communication-manager"    <a class="link" href="InfCommunicationManager.html" title="InfCommunicationManager"><span class="type">InfCommunicationManager</span></a>*  : Read / Write / Construct Only</pre>
<p>The communication manager used for sending requests.</p>
</div>
<hr>
<div class="refsect2" title='The "status" property'>
<a name="InfSession--status"></a><h3>The <code class="literal">"status"</code> property</h3>
<pre class="programlisting">  "status"                   <a class="link" href="InfSession.html#InfSessionStatus" title="enum InfSessionStatus"><span class="type">InfSessionStatus</span></a>      : Read / Write / Construct Only</pre>
<p>Current status of the session.</p>
<p>Default value: INF_SESSION_RUNNING</p>
</div>
<hr>
<div class="refsect2" title='The "subscription-group" property'>
<a name="InfSession--subscription-group"></a><h3>The <code class="literal">"subscription-group"</code> property</h3>
<pre class="programlisting">  "subscription-group"       <a class="link" href="InfCommunicationGroup.html" title="InfCommunicationGroup"><span class="type">InfCommunicationGroup</span></a>*  : Read / Write</pre>
<p>Communication group of subscribed connections.</p>
</div>
<hr>
<div class="refsect2" title='The "sync-connection" property'>
<a name="InfSession--sync-connection"></a><h3>The <code class="literal">"sync-connection"</code> property</h3>
<pre class="programlisting">  "sync-connection"          <a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a>*     : Read / Write / Construct Only</pre>
<p>Connection which synchronizes the initial session state.</p>
</div>
<hr>
<div class="refsect2" title='The "sync-group" property'>
<a name="InfSession--sync-group"></a><h3>The <code class="literal">"sync-group"</code> property</h3>
<pre class="programlisting">  "sync-group"               <a class="link" href="InfCommunicationGroup.html" title="InfCommunicationGroup"><span class="type">InfCommunicationGroup</span></a>*  : Read / Write / Construct Only</pre>
<p>Communication group in which to perform synchronization.</p>
</div>
<hr>
<div class="refsect2" title='The "user-table" property'>
<a name="InfSession--user-table"></a><h3>The <code class="literal">"user-table"</code> property</h3>
<pre class="programlisting">  "user-table"               <a class="link" href="InfUserTable.html" title="InfUserTable"><span class="type">InfUserTable</span></a>*         : Read / Write / Construct Only</pre>
<p>User table containing the users of the session.</p>
</div>
</div>
<div class="refsect1" title="Signal Details">
<a name="InfSession.signal-details"></a><h2>Signal Details</h2>
<div class="refsect2" title='The "close" signal'>
<a name="InfSession-close"></a><h3>The <code class="literal">"close"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> *session,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>    user_data)      : Run Last</pre>
<p>
This signal is emitted if the session is closed. Note that this signal
is not called as a client if the connection to the sessions has merely
been lost, only the relevant <a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a> has its
<a class="link" href="InfXmlConnection.html#InfXmlConnection--status" title='The "status" property'><span class="type">"status"</span></a> property changed.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>The <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> that is being closed
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title='The "synchronization-begin" signal'>
<a name="InfSession-synchronization-begin"></a><h3>The <code class="literal">"synchronization-begin"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>            *session,
                                                        <a class="link" href="InfCommunicationGroup.html" title="InfCommunicationGroup"><span class="type">InfCommunicationGroup</span></a> *group,
                                                        <a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a>      *connection,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>               user_data)       : Run Last</pre>
<p>
This signal is emitted whenever the session is started to be synchronized
to another connection. Note that, in contrast to
<a class="link" href="InfSession.html#InfSession-synchronization-progress" title='The "synchronization-progress" signal'><span class="type">"synchronization-progress"</span></a>,
<a class="link" href="InfSession.html#InfSession-synchronization-failed" title='The "synchronization-failed" signal'><span class="type">"synchronization-failed"</span></a> and
<a class="link" href="InfSession.html#InfSession-synchronization-complete" title='The "synchronization-complete" signal'><span class="type">"synchronization-complete"</span></a> it cannot happen that the signal
is emitted when <em class="parameter"><code>session</code></em> is being synchronized itself, because that can
happen at construction time only when no one had a chance to connect
signal handlers anyway.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>The <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> that is synchronizing.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group</code></em> :</span></p></td>
<td>The <a class="link" href="InfCommunicationGroup.html" title="InfCommunicationGroup"><span class="type">InfCommunicationGroup</span></a> used for synchronization.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>The <a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a> to which the session is synchronized.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title='The "synchronization-complete" signal'>
<a name="InfSession-synchronization-complete"></a><h3>The <code class="literal">"synchronization-complete"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>       *session,
                                                        <a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a> *connection,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>          user_data)       : Run Last</pre>
<p>
This signal is emitted when synchronization has completed, in addition
to <a class="link" href="InfSession.html#InfSession-synchronization-progress" title='The "synchronization-progress" signal'><span class="type">"synchronization-progress"</span></a> with a progress value of 1.0.
</p>
<p>
If a callback is connected before the default handler, it can find out
whether the remote side is synchronizing the local side by comparing
<em class="parameter"><code>sessions</code></em>'s status with <a class="link" href="InfSession.html#INF-SESSION-SYNCHRONIZING:CAPS"><code class="literal">INF_SESSION_SYNCHRONIZING</code></a>. The default
signal handler sets the status to <a class="link" href="InfSession.html#INF-SESSION-RUNNING:CAPS"><code class="literal">INF_SESSION_RUNNING</code></a>, so checking
afterwards is not too useful.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>The <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> that has or was synchronized
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>The <a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a> through which synchronization happened
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title='The "synchronization-failed" signal'>
<a name="InfSession-synchronization-failed"></a><h3>The <code class="literal">"synchronization-failed"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>       *session,
                                                        <a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a> *connection,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>          error,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>          user_data)       : Run Last</pre>
<p>
This signal is emitted when synchronization has failed before its
completion due to malformed data from the other side or network failure.
</p>
<p>
If this happens during initial synchronization, <a class="link" href="InfSession.html#InfSession-close" title='The "close" signal'><span class="type">"close"</span></a> is
emitted as well at this point.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>The <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> that failed to synchronize or be synchronized
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>The <a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a> through which synchronization happened
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>A pointer to a <a href="http://library.gnome.org/devel/glib/unstable/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> object with details on the error
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title='The "synchronization-progress" signal'>
<a name="InfSession-synchronization-progress"></a><h3>The <code class="literal">"synchronization-progress"</code> signal</h3>
<pre class="programlisting"><span class="returnvalue">void</span>                user_function                      (<a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a>       *session,
                                                        <a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a> *connection,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a>           progress,
                                                        <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a>          user_data)       : Run Last</pre>
<p>
This signal is emitted whenever a new XML node has been sent or received
over <em class="parameter"><code>connection</code></em> as part of a synchronization. The process is completed
when <em class="parameter"><code>progress</code></em> reaches the value 1.0. At this point,
<span class="type">"synchronisation-complete"</span> is also emitted.
</p>
<p>
If <em class="parameter"><code>sessions</code></em>'s status is <a class="link" href="InfSession.html#INF-SESSION-SYNCHRONIZING:CAPS"><code class="literal">INF_SESSION_SYNCHRONIZING</code></a>, the local
side is being synchronized by the remote side. If the status is
<a class="link" href="InfSession.html#INF-SESSION-RUNNING:CAPS"><code class="literal">INF_SESSION_RUNNING</code></a>, the local side is updating the remote side.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>session</code></em> :</span></p></td>
<td>The <a class="link" href="InfSession.html" title="InfSession"><span class="type">InfSession</span></a> that is synchronizing or being synchronized
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>connection</code></em> :</span></p></td>
<td>The <a class="link" href="InfXmlConnection.html" title="InfXmlConnection"><span class="type">InfXmlConnection</span></a> through which progress is made
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>progress</code></em> :</span></p></td>
<td>A <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gdouble"><span class="type">gdouble</span></a> value ranging from 0.0 to 1.0.
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>user_data</code></em> :</span></p></td>
<td>user data set when the signal handler was connected.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
<div class="footer">
<hr>
          Generated by GTK-Doc V1.15</div>
</body>
</html>